﻿@using System.Drawing
@using SelfMadeMillionaire.Core.Enums
@using SelfMadeMillionaire.Web.Infrastructure
@model SelfMadeMillionaire.Web.Infrastructure.ViewModels.EmailSend.EmailSendView
@{
    ViewBag.Title = "View Items";
    
	Layout = "~/Areas/Admin/Views/Shared/_AdminLayout.cshtml";
}

@using (Html.BeginForm("Resend", "EmailSend", FormMethod.Get, new {@id = Model.ID, @class = "form-horizontal" }))
{
	@Html.HiddenFor(m=>m.ID)
    @Html.HiddenFor(m=>m.CreationDate)
    @Html.HiddenFor(m=>m.Status)
    @Html.HiddenFor(m=>m.Page)
    @Html.ValidationSummary(null, new {@style = "color: red" })
    <div class="table-responsive">
        <table width="100%" border="0" cellspacing="0" cellpadding="0" class="newsletter_seach_form">
            <tbody>
                <tr style="height: 50px" >
                    <td width="20%"> @Html.LabelFor(m => m.SendTo)</td>
                    <td width="80%">
                        <table>
                            <tr>
                                <td width="60%">
                                    @Html.DisplayTextFor(m => m.SendTo)
                                </td>
                                <td width="15%">
                                    @Html.LabelFor(m => m.SentDate)
                                </td>
                                <td width="20%">
                                    @if (Model.Status == (byte)StatusType.Active)
                                    {
                                        @Html.Label("The message was not sent")
                                    }
                                    else
                                    {
                                        @Html.DisplayTextFor(m => m.SentDate)
                                    }
                                    
                                </td>
                                @*<td width="10%"></td>*@
                            </tr>
                        </table> 
                    </td>
                    
                </tr>
                <tr>
                    <td></td>
                    <td><hr style="border-top: 1px solid black!important"/> </td>
                </tr>
                <tr style="height: 50px">
                    <td width="20%"> @Html.LabelFor(m => m.AdditRecipients)</td>
                    <td width="80%"> @Html.DisplayTextFor(m => m.AdditRecipients)</td>
                
                </tr>
                <tr>
                    <td></td>
                    <td><hr style="border-top: 1px solid black!important"/> </td>
                </tr>
                <tr style="height: 50px">
                    <td width="12%"> @Html.LabelFor(m => m.Subject)</td>	
                    <td width="20%"> @Html.DisplayTextFor(x => x.Subject)</td>
                    
                </tr>
                
            </tbody>
        </table>
    </div>
    
    <hr style="border-top: 1px solid black!important"/>
    <div style = "width: 98%" >
            @Html.DisplayTextFor(model => model.Body)
    </div>
    <hr style="border-top: 1px solid black!important"/>
    
	<div class="row">
		<div class="col-sm-12">
		    <div class="pull-left">
		        <br/>
		        <button type="submit" class="btn btn-default width80" onclick="return confirm('Do you want to resend?');">Resend</button>
                <a href="@Url.Action("EmailSendList", new { page = Model.Page })" class="btn btn-default width80">Cancel</a>
		    </div>
		</div>
	</div>
}

